package cn.yuemouren.security.browser.session;

import org.springframework.security.web.session.InvalidSessionStrategy;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @Author: Timi
 * @Description: 自定义实现默认过期session策略
 * @Date: 2020/6/28 14:13
 * @Version: v1.0
 */
public class TimiInvalidSessionStrategy extends AbstractSessionStrategy implements InvalidSessionStrategy {

    public TimiInvalidSessionStrategy(String invalidSessionUrl) {
        super(invalidSessionUrl);
    }

    @Override
    public void onInvalidSessionDetected(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
        onSessionInvalid(request,response);
    }
}
